//导入对应的包
const express = require('express')
const router = express.Router()

//导入用户路由处理函数对应模块
const user_handler = require('../router_handler/user.js')

//导入验证规则的模块
const { reg_Login_Schema } = require('../schema/user.js')
//导入数据验证的中间件
const expressJoi = require('@escook/express-joi')

//注册新用户
router.post('/reguser', expressJoi(reg_Login_Schema), user_handler.regUser)
//登录功能
router.post('/login', expressJoi(reg_Login_Schema), user_handler.login)

module.exports = router
